package com.refactoring.demo.chapter01.price;

import com.refactoring.demo.chapter01.Movie;

/**
 * @作者：刘富国
 * @创建时间：2018/4/26 11:53
 */
public class NewReleasePrice extends Price {
    @Override
    int getPriceCode() {
        return Movie.NEW_RELEASE;
    }

    @Override
    public double getCharge(Integer daysRented) {
        return daysRented * 3;
    }

    @Override
    public int getFreqRenterPoints(Integer daysRented) {
        return daysRented > 1 ? 2 : 1;
    }
}
